package com.lls.punchin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lls.punchin.common.base.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDate;

/**
 * <p>
 * 用户积分表
 * </p>
 *
 * @author lls
 * @since 2025-09-06
 */
@Getter
@Setter
@ToString
@TableName("points_record")
public class PointsRecordEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableField("user_id")
    private String userId;

    /**
     * 积分日期
     */
    @TableField("record_date")
    private LocalDate recordDate;

    /**
     * 积分变动，带正负
     */
    @TableField("points_change")
    private Integer pointsChange;

    /**
     * 变动原因
     */
    @TableField("remark")
    private String remark;

    /**
     * 当前累计
     */
    @TableField("current_total")
    private Integer currentTotal;
}
